<!-- 导航URL -->
<div class="row wrapper border-bottom white-bg page-heading">
	<div class="col-md-12">
		<ol class="breadcrumb">
			<li><a>主页</a></li>
			<li><a>风控管理</a></li>
			<li class="active"><strong>规则设置</strong></li>
		</ol>
	</div>
</div>
<style>
	.textContect{
		float:left;
		padding:7px 5PX 0 5PX;
	}
	.inputContectMin{
		width:50px;
		float:left;
		text-align:center;
	}
	.inputContectMax{
		width:100px;
		float:left;
		text-align:center;
	}
</style>
<!-- 主要内容 -->
<div class="wrapper wrapper-content animated fadeIn" ng-app
	 ng-controller="riskRulesSetCtrl">
	<form class="form-horizontal" id="form1">
		<div class="row">
			<div class="col-lg-12">
				<div class="panel-body ibox float-e-margins">
					<div class="ibox-content">

						<div class="form-group">
							<label class="col-sm-2 control-label">规则编号：</label>
							<div class="col-sm-2 checkbox" ng-bind="info.rulesNo"></div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">规则引擎：</label>
							<div class="col-sm-10" style="float:left">
								<span class="textContect" >针对所有交易,注册</span>
								<input type="text" class="form-control inputContectMin"  ng-model="values.registeredDay">
								<div class="textContect">天内的商户</div>
								<input type="text" class="form-control inputContectMin"  ng-model="values.tradeDay">
								<div class="textContect" >天内</div>
								<input type="text" class="form-control inputContectMax"  ng-model="values.tradeTimeStart">
								<div class="textContect" > - </div>
								<input type="text" class="form-control inputContectMax"  ng-model="values.tradeTimeEnd">
								<div class="textContect">点扫码交易金额在</div>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label"></label>
							<div class="col-sm-10" style="float:left">
								<input type="text" class="form-control inputContectMax"  ng-model="values.minAmount">
								<div class="textContect"> - </div>
								<input type="text" class="form-control inputContectMax"  ng-model="values.maxAmount">
								<div class="textContect">之间的累计笔数 >= </div>
								<input type="text" class="form-control inputContectMin"  ng-model="values.tradeNum">
								<div class="textContect">笔,且商户历史交易中,银联二维码交易占比 >= </div>
								<input type="text" class="form-control inputContectMin"  ng-model="values.ratio">
								<div class="textContect">%，</div>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label"></label>
							<div class="col-sm-10" style="float:left">
								<span class="textContect" >注册</span>
								<input type="text" class="form-control inputContectMin"  ng-model="values.s_registeredDay">
								<div class="textContect">天内的商户</div>
								<input type="text" class="form-control inputContectMin"  ng-model="values.s_tradeDay">
								<div class="textContect" >天内</div>
								<input type="text" class="form-control inputContectMax"  ng-model="values.s_tradeTimeStart">
								<div class="textContect" > - </div>
								<input type="text" class="form-control inputContectMax"  ng-model="values.s_tradeTimeEnd">
								<div class="textContect">点扫码交易金额在</div>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label"></label>
							<div class="col-sm-10" style="float:left">
								<input type="text" class="form-control inputContectMax"  ng-model="values.s_minAmount">
								<div class="textContect"> - </div>
								<input type="text" class="form-control inputContectMax"  ng-model="values.s_maxAmount">
								<div class="textContect">之间的累计笔数 >= </div>
								<input type="text" class="form-control inputContectMin"  ng-model="values.s_tradeNum">
								<div class="textContect">笔,且商户历史交易中扫码交易（微信、支付宝）占比 >= </div>
								<input type="text" class="form-control inputContectMin"  ng-model="values.s_ratio">
								<div class="textContect">%.</div>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label">规则指令：</label>
							<div class="col-sm-2 checkbox" ng-bind="info.rulesInstruction | formatDropping:rulesInstructions"></div>
							<div class="col-sm-4">
								<button class="btn btn-new" type="button" ng-hide="info.rulesInstruction==2 || info.rulesInstruction==3  || info.rulesInstruction==5" ng-click="modifyRulesInstruction(info.rulesNo,info.rulesInstruction)" style="width: 120px" id="btnSubmit">修改指令</button>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">处理措施：</label>
							<div class="col-sm-3">
								<input type="text" class="form-control"  ng-model="info.treatmentMeasures">
							</div>
						</div>

						<div ui-view="riskRulesSetCommon"></div>
						<div class="form-group">
							<label class="col-sm-2 control-label">备注：</label>
							<div class="col-sm-5">
								<textarea class="form-control" rows="5" ng-model="info.remark"></textarea>
							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-2 control-label"></label>
							<div class="col-lg-8">
								<button class="btn btn-primary btn-mr20" ng-disabled="submitting" type="button" ng-click="commit()">提交</button>
								<a class="btn btn-primary4" type="button"  ui-sref="risk.riskRulesMag">返回</a>
							</div>
						</div>

					</div>
				</div>
			</div>
		</div>
	</form>

	<!-- 模态框（Modal）修改状态 -->
	<div id="modifyRulesInstructionModal" class="modal fade form-horizontal" tabindex="-1" role="dialog">
		<div class="modal-dialog" style="height:250px;width: 500px">
			<div class="modal-content" >
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal">
						&times;
					</button>
					<h3 class="modal-title">修改指令</h3>
				</div>
				<div class="modal-body" style="height:150px;width: 400px">
					<form id="form2">
						<div class="form-group">
							<label class="col-sm-4 control-label">当前指令为：</label>
							<div class="col-sm-6 checkbox" ng-bind="rulesInstruction | formatDropping:rulesInstructions"></div>
						</div>
						<div class="form-group">
							<label class="col-sm-4 control-label">修改指令为：</label>
							<div class="col-sm-7">
								<select class="form-control" ng-model="rulesInstructionSelcet" ng-options="x.value as x.text for x in rulesInstructionModals"/>
							</div>
							<input type="hidden" class="form-control" ng-model="rulesNo">
						</div>
					</form>
				</div>
				<div class="modal-footer">
					<label class="col-sm-4"></label>
					<div class="form-group" style="float: left">
						<button type="button" ng-click="modifyRulesInstructionCommit()" ng-disabled="submitting" class="btn btn-primary btn-mr20">确定</button>
						<button type="button" ng-click="modifyRulesInstructionColse()" ng-disabled="submitting" class="btn btn-primary11">关闭</button>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>